#include "pch.h"

using std::string;

Simulators::~Simulators() {
	for (auto & iter : sims) {
		delete iter.second;
	}
}

SimulatorInterface * Simulators::getIns(const string & name) {
	static Simulators ins;

	if (ins.sims.find(name) == ins.sims.end()) {
		if (name == "SaveBridgeSimulator") {
			ins.sims[name] = new SaveBridgeSimulator();
		}
	}

	return ins.sims[name];
}